/* mf8def.i - Definitions for MFG/PRO GUI Sign-On Program                     */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.15 $                                                          */
/******************************** Tokens **************************************/
/*V8:ConvertMode=NoConvert                                                    */
/*V8:RunMode=Windows                                                          */
/******************************** History *************************************/
/* Revision: 8.3     Last Modified: 05/31/95     By: jzs                      */
/* Revision: 8.5     Last Modified: 01/25/96     By: jpm      /*J0CF*/        */
/* Revision: 8.5     Last Modified: 03/21/96     By: aed      /*J0G1*/        */
/* REVISION: 8.6E    LAST MODIFIED: 02/23/98     BY: *L007* A. Rahane         */
/* REVISION: 8.6E    LAST MODIFIED: 03/02/98     BY: *L008* A. Rahane         */
/* REVISION: 8.6E    LAST MODIFIED: 06/02/98     By: *K1NM* Paul Knopf        */
/* REVISION: 8.6E    LAST MODIFIED: 06/19/98     By: *J2PL* Viswanathan M     */
/* Revision: 9.1     Last Modified: 03/15/00     By: *N08T* Dennis Taylor     */
/* Revision: 9.1     Last Modified: 08/13/00     By: *N0KR* Mark Brown        */
/* Revision: 1.13       BY: Reetu Kapoor         DATE: 03/28/01  ECO: *M11N*  */
/* Revision: 1.14       BY: Jean Miller          DATE: 07/30/01  ECO: *N10T*  */
/* $Revision: 1.15 $    BY: Jean Miller          DATE: 08/12/02  ECO: *P08G*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

define     shared variable menu           as character.
define new shared variable global-exiting as logical.

define variable saved-menu-type as character no-undo.
define variable changed-type    as logical no-undo initial no.
define variable save-userid     as logical view-as toggle-box
   label "Save User ID for next login" initial true no-undo.
define variable save-passwd     like passwd.
define variable n-passwd        like passwd.
define variable repr-text       like msg_desc no-undo.

/* Define the widget handle for the window  */
define variable WINDOW-1 as widget-handle no-undo
   bgcolor 8.

define button Btn_Pw_Ok
   label "OK"
   font 1
   size 10 by 1.2
   auto-go.

define button Btn_Pw_Cancel
   label "Cancel"
   font 1
   size 10 by 1.2
   auto-endkey.

define button Button-Cancel
   label "E&xit"
   font 1
   size 10 by 1
   auto-endkey.
   
/*
define button Button-Help
   label "&Help"
   font 1
   size 12 by 1.
*/

define button Button-Ok
   label "&OK"
   auto-go
   font 1
   size 10 by 1.

define button Button-Setup-Ok
   label "&OK"
   size 12 by 1
   font 1
   auto-go.

define button Button-Setup-Cancel
   label "&Cancel"
   size 12 by 1
   font 1
   auto-endkey.

define variable local-menu-type as character
   label "        Menu Style"
   view-as radio-set vertical
   radio-buttons
   "Icons","a",
   "Tear-Off","b",
   "Character","c".

define menu StylePopup title "        Menu Style"
   menu-item StyleA label  "Icons     &A" toggle-box
   menu-item StyleB label  "Tear-Off  &B" toggle-box
   menu-item StyleC label  "Character &C" toggle-box.

/*
define rectangle RECT-16
   edge-pixels 2
   graphic-edge
   no-fill
   size 63.25 by 3.45
   bgcolor 7 fgcolor 7 .
*/

/* DEFINE USER COUNT FIELDS JUST LIKE FIELDS IN SIGN-ON */
/* FRAME SO WE CAN GET THEM TO LINE UP AND BEHAVE THE   */
/* SAME USING EXTERNALIZED LABELS.                      */
define variable your-unum like global_userid label "User ID" no-undo.
define variable tot-unum like passwd no-undo.

/* ************************  Frame Definitions  *********************** */

define frame signon-frame
/*
   rect-16                 at row 12.75 column 9
   your-unum               at row 13.15 column 17
   tot-unum                at row 13.15 column 45
*/   
   Button-Cancel  at row 9.5  column 21
   global_userid  at row 7  column 11 label "User ID"
   validate((LAST-EVENT:WIDGET-ENTER = Button-Cancel:handle) or
   (keylabel(lastkey) = "ESC") or global_userid:screen-value <> "", "User ID cannot be blank")
   passwd         at row 8  column 10 blank
/*   
   save-userid    at row 7  column 8
*/   
/*   Button-Help    at row 16.5   column 3  */
   Button-Ok      at row 9.5   column 8
with /* 1 down */ no-box overlay side-labels no-underline
at column 1 row 1 size 35 by 10 three-d
default-button Button-Ok
cancel-button Button-Cancel.

/* SET EXTERNALIZED LABELS FOR FRAME SIGNON-FRAME. */
button-Ok:label     = getTermLabel("&OK",12).
button-Cancel:label = getTermLabel("E&XIT",12).
/*
button-Help:label   = getTermLabel("&HELP",12).
save-userid:label   = getTermLabel("SAVE_USER_ID",40).
*/
global_userid:label = getTermLabel("USER_ID",12).
passwd:label        = getTermLabel("PASSWORD",12).
/*
your-unum:label     = getTermLabel("ACTIVE_SESSIONS",20).
tot-unum:label      = getTermLabel("SESSIONS_ALLOWED",26).
*/

frame signon-frame:scrollable = false.

{mfglobex.i &frm = "signon-frame" &vBias = "1.25" &hBias = "15.7"}

/*
define frame frame-setup-options
   local-menu-type skip(.5)
   space(1)
   Button-Setup-Ok
   Button-Setup-Cancel
   space(1) skip(.5)
with frame frame-setup-options side-labels view-as dialog-box three-d
default-button button-setup-ok cancel-button button-setup-cancel.
*/
/* SET EXTERNALIZED LABELS FOR FRAME FRAME-SETUP-OPTIONS. */
/*
local-menu-type:label     = getTermLabel("MENU_STYLE",11).
Button-Setup-Ok:label     = getTermLabel("&OK",12).
Button-Setup-Cancel:label = getTermLabel("&CANCEL",12).
*/
/*
define frame b
   skip(1)
   o_passwd colon 25
   blank    label "New Password"
   skip
   n-passwd colon 25
   blank
   skip(1)
   Btn_Pw_Ok at 5
   Btn_Pw_Cancel at 35
   space(5)
   skip(.5)
with frame b view-as dialog-box side-labels
default-button Btn_Pw_Ok
cancel-button  Btn_Pw_Cancel three-d.
*/
/* SET EXTERNALIZED LABELS FOR FRAME b. */
/* CHANGED THE LABELS OF o_passwd and n-passwd TO MAKE THEM CONSISTENT */
/* WITH THE LABELS DISPLAYED IN NETUI                                  */
/*
o_passwd:label      = getTermLabel("NEW_PASSWORD",23).
n-passwd:label      = getTermLabel("RECONFIRM_NEW_PASSWORD",23).
Btn_Pw_Ok:label     = getTermLabel("&OK",12).
Btn_Pw_Cancel:label = getTermLabel("&CANCEL",12).
*/
/* THIS PRODUCT MAY NOT BE REPRODUCED OR DISTRIBUTED. */
/*
{pxmsg.i &MSGNUM=3775 &ERRORLEVEL=1 &MSGBUFFER=repr-text}
h-widget = frame b:handle.
h-widget:title = repr-text.
*/
assign WINDOW-1 = current-window.
